package com.house.business.mapper;

import com.house.business.entity.LeasingInformation;
import com.house.business.vo.LeasingInformationVo;
import com.house.framework.mapper.MapperBase;
import org.apache.ibatis.annotations.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.conditions.Wrapper;

import java.util.Map;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 租赁信息表 Mapper 接口
 * </p>
 *
 * @since 2023-05-09
 */
@Mapper
public interface LeasingInformationMapper extends MapperBase<LeasingInformation> {

  /**
  * 取指定ID的租赁信息表数据
  * @param id
  * t_leasing_information 主键ID
  * @return
  * 返回指定ID的租赁信息表数据
  */
    /**@Select("SELECT t.id AS id,t.house_id AS house_id,t.house_name AS house_name,t.address AS address,t.tenant_name AS tenant_name," +
		"t.lease_time AS lease_time,t.lease_state AS lease_state,t.pay_amount AS pay_amount,t.rent_state AS rent_state,t.payable_time AS payable_time," +
		"t.paid_in_time AS paid_in_time,t.contract_img AS contract_img FROM t_leasing_information t WHERE id = #{id}")*/
    LeasingInformationVo get(@Param("id") Long id);

  /**
  * 租赁信息表分页取数
  * @param page
  * 分页参数；
  * @param wrapper
  * 条件参数；
  * @return IPage<LeasingInformationVo>
  * 返回分页数据
  */
    /**@Select("SELECT t.id AS id,t.house_id AS house_id,t.house_name AS house_name,t.address AS address,t.tenant_name AS tenant_name," +
		"t.lease_time AS lease_time,t.lease_state AS lease_state,t.pay_amount AS pay_amount,t.rent_state AS rent_state,t.payable_time AS payable_time," +
		"t.paid_in_time AS paid_in_time,t.contract_img AS contract_img FROM t_leasing_information t ${ew.customSqlSegment}")*/
    IPage<LeasingInformationVo> page(IPage<LeasingInformationVo> page,@Param(Constants.WRAPPER) Wrapper<LeasingInformationVo> wrapper);

  /**
  * 删除指定ID的租赁信息表数据
  * @param id
  * t_leasing_information 主键ID
  */
    /**@Delete("DELETE FROM t_leasing_information WHERE id = #{id}")*/
    void delete(@Param("id") Long id);

  /**
  * 批量删除指定ID的租赁信息表数据
  * @param ids
  * t_leasing_information 主键ID数组
  */
    /**@Delete("<script>DELETE FROM t_leasing_information WHERE id IN <foreach collection='ids' item='id' open='(' separator=',' close=')'>#{id}</foreach> </script>")*/
    void batchDelete(@Param("ids") Long[] ids);
}
